3.35 \(\int \frac{a+b \log (c x^n)}{x (d+e x)} \, dx\)

Optimal. Leaf size=44 \[ \frac{b n \text{PolyLog}\left (2,-\frac{d}{e x}\right )}{d}-\frac{\log \left (\frac{d}{e x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d} \]

[Out]

-((Log[1 + d/(e*x)]*(a + b*Log[c*x^n]))/d) + (b*n*PolyLog[2, -(d/(e*x))])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0908774, antiderivative size = 66, normalized size of antiderivative = 1.5, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {2344, 2301, 2317, 2391} \[ -\frac{b n \text{PolyLog}\left (2,-\frac{e x}{d}\right )}{d}-\frac{\log \left (\frac{e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 b d n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*(d + e*x)),x]

[Out]

(a + b*Log[c*x^n])^2/(2*b*d*n) - ((a + b*Log[c*x^n])*Log[1 + (e*x)/d])/d - (b*n*PolyLog[2, -((e*x)/d)])/d

Rule 2344

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_Symbol] :> Dist[1/d, Int[(a + b*
Log[c*x^n])^p/x, x], x] - Dist[e/d, Int[(a + b*Log[c*x^n])^p/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n}, x]
 && IGtQ[p, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{x (d+e x)} \, dx &=\frac{\int \frac{a+b \log \left (c x^n\right )}{x} \, dx}{d}-\frac{e \int \frac{a+b \log \left (c x^n\right )}{d+e x} \, dx}{d}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 b d n}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{e x}{d}\right )}{d}+\frac{(b n) \int \frac{\log \left (1+\frac{e x}{d}\right )}{x} \, dx}{d}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 b d n}-\frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac{e x}{d}\right )}{d}-\frac{b n \text{Li}_2\left (-\frac{e x}{d}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.03245, size = 63, normalized size = 1.43 \[ \frac{\left (a+b \log \left (c x^n\right )\right ) \left (a+b \log \left (c x^n\right )-2 b n \log \left (\frac{e x}{d}+1\right )\right )}{2 b d n}-\frac{b n \text{PolyLog}\left (2,-\frac{e x}{d}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x*(d + e*x)),x]

[Out]

((a + b*Log[c*x^n])*(a + b*Log[c*x^n] - 2*b*n*Log[1 + (e*x)/d]))/(2*b*d*n) - (b*n*PolyLog[2, -((e*x)/d)])/d

________________________________________________________________________________________

Maple [C]  time = 0.142, size = 336, normalized size = 7.6 \begin{align*} -{\frac{b\ln \left ({x}^{n} \right ) \ln \left ( ex+d \right ) }{d}}+{\frac{b\ln \left ({x}^{n} \right ) \ln \left ( x \right ) }{d}}-{\frac{bn \left ( \ln \left ( x \right ) \right ) ^{2}}{2\,d}}+{\frac{bn\ln \left ( ex+d \right ) }{d}\ln \left ( -{\frac{ex}{d}} \right ) }+{\frac{bn}{d}{\it dilog} \left ( -{\frac{ex}{d}} \right ) }+{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}\ln \left ( x \right ) }{d}}-{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}\ln \left ( ex+d \right ) }{d}}+{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) \ln \left ( ex+d \right ) }{d}}-{\frac{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) \ln \left ( x \right ) }{d}}-{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}\ln \left ( x \right ) }{d}}-{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) \ln \left ( ex+d \right ) }{d}}+{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}\ln \left ( ex+d \right ) }{d}}+{\frac{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) \ln \left ( x \right ) }{d}}-{\frac{b\ln \left ( c \right ) \ln \left ( ex+d \right ) }{d}}+{\frac{b\ln \left ( c \right ) \ln \left ( x \right ) }{d}}-{\frac{a\ln \left ( ex+d \right ) }{d}}+{\frac{a\ln \left ( x \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x/(e*x+d),x)

[Out]

-b*ln(x^n)/d*ln(e*x+d)+b*ln(x^n)/d*ln(x)-1/2*b*n/d*ln(x)^2+b*n/d*ln(e*x+d)*ln(-e*x/d)+b*n/d*dilog(-e*x/d)+1/2*
I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/d*ln(x)-1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2/d*ln(e*x+d)+1/2*I*b*Pi*csgn(
I*x^n)*csgn(I*c*x^n)*csgn(I*c)/d*ln(e*x+d)-1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)/d*ln(x)-1/2*I*b*Pi*c
sgn(I*c*x^n)^3/d*ln(x)-1/2*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)/d*ln(e*x+d)+1/2*I*b*Pi*csgn(I*c*x^n)^3/d*ln(e*x+d)
+1/2*I*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)/d*ln(x)-b*ln(c)/d*ln(e*x+d)+b*ln(c)/d*ln(x)-a/d*ln(e*x+d)+a/d*ln(x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -a{\left (\frac{\log \left (e x + d\right )}{d} - \frac{\log \left (x\right )}{d}\right )} + b \int \frac{\log \left (c\right ) + \log \left (x^{n}\right )}{e x^{2} + d x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(e*x+d),x, algorithm="maxima")

[Out]

-a*(log(e*x + d)/d - log(x)/d) + b*integrate((log(c) + log(x^n))/(e*x^2 + d*x), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \log \left (c x^{n}\right ) + a}{e x^{2} + d x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(e*x+d),x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)/(e*x^2 + d*x), x)

________________________________________________________________________________________

Sympy [C]  time = 23.2241, size = 158, normalized size = 3.59 \begin{align*} - \frac{2 a e \left (\begin{cases} \frac{1}{2 e} + \frac{x}{d} & \text{for}\: e = 0 \\- \frac{\log{\left (- 2 e x \right )}}{2 e} & \text{otherwise} \end{cases}\right )}{d} - \frac{2 a e \left (\begin{cases} \frac{1}{2 e} + \frac{x}{d} & \text{for}\: e = 0 \\\frac{\log{\left (2 d + 2 e x \right )}}{2 e} & \text{otherwise} \end{cases}\right )}{d} + b n \left (\begin{cases} - \frac{1}{e x} & \text{for}\: d = 0 \\\frac{\begin{cases} \log{\left (e \right )} \log{\left (x \right )} + \operatorname{Li}_{2}\left (\frac{d e^{i \pi }}{e x}\right ) & \text{for}\: \left |{x}\right | < 1 \\- \log{\left (e \right )} \log{\left (\frac{1}{x} \right )} + \operatorname{Li}_{2}\left (\frac{d e^{i \pi }}{e x}\right ) & \text{for}\: \frac{1}{\left |{x}\right |} < 1 \\-{G_{2, 2}^{2, 0}\left (\begin{matrix} & 1, 1 \\0, 0 & \end{matrix} \middle |{x} \right )} \log{\left (e \right )} +{G_{2, 2}^{0, 2}\left (\begin{matrix} 1, 1 & \\ & 0, 0 \end{matrix} \middle |{x} \right )} \log{\left (e \right )} + \operatorname{Li}_{2}\left (\frac{d e^{i \pi }}{e x}\right ) & \text{otherwise} \end{cases}}{d} & \text{otherwise} \end{cases}\right ) - b \left (\begin{cases} \frac{1}{e x} & \text{for}\: d = 0 \\\frac{\log{\left (\frac{d}{x} + e \right )}}{d} & \text{otherwise} \end{cases}\right ) \log{\left (c x^{n} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(e*x+d),x)

[Out]

-2*a*e*Piecewise((1/(2*e) + x/d, Eq(e, 0)), (-log(-2*e*x)/(2*e), True))/d - 2*a*e*Piecewise((1/(2*e) + x/d, Eq
(e, 0)), (log(2*d + 2*e*x)/(2*e), True))/d + b*n*Piecewise((-1/(e*x), Eq(d, 0)), (Piecewise((log(e)*log(x) + p
olylog(2, d*exp_polar(I*pi)/(e*x)), Abs(x) < 1), (-log(e)*log(1/x) + polylog(2, d*exp_polar(I*pi)/(e*x)), 1/Ab
s(x) < 1), (-meijerg(((), (1, 1)), ((0, 0), ()), x)*log(e) + meijerg(((1, 1), ()), ((), (0, 0)), x)*log(e) + p
olylog(2, d*exp_polar(I*pi)/(e*x)), True))/d, True)) - b*Piecewise((1/(e*x), Eq(d, 0)), (log(d/x + e)/d, True)
)*log(c*x**n)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left (c x^{n}\right ) + a}{{\left (e x + d\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/((e*x + d)*x), x)